home *** CD-ROM | disk | FTP | other *** search
- Path: sundog.tiac.net!stanr
- From: stanr@tiac.net (Stan Ryckman)
- Newsgroups: comp.std.c
- Subject: Re: alignment requirements for all structures?
- Date: 13 Mar 1996 14:27:51 GMT
- Organization: Amber & Sneakers Fan Club
- Message-ID: <4i6m18$81a@sundog.tiac.net>
- References: <1996Mar7.151216.1793@ittpub> <1996Mar12.175916.7256@sq.com>
- NNTP-Posting-Host: sunspot.tiac.net
-
- In article <1996Mar12.175916.7256@sq.com>, Mark Brader <msb@sq.com> wrote:
- :Wil Evers (wil@ittpub.nl) writes:
- ...
- :> For example, if I write:
- :> #include <stdio.h>
- :> struct c { char data; } carray[10];
- :> int main() { printf("%u\n", sizeof carray); return 0; }
- :
- :... then on a word-addressed machine the output might very well be "40". On
- :that machine, sizeof (struct c *) would probably be 4 while sizeof (char *)
- :would be 8, or maybe 6.
-
- Or any machine could output "Segmentation fault... Core dumped"
- if size_t is not unsigned int.
-
- Cheers,
- Stan.
- --
- Stan Ryckman (stanr@tiac.net)
- (Apologies for non-responses or late responses to some posts;
- .newsrc was trashed and I'm trying to get it back to where it was.)
-